package com.example.demo.pojo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Result<T> {
    private Integer code;
    private String msg;
    private T data;
    public static<T> Result success(T data){
        return new Result(200,"success",data);
    }
    public static Result success(){
        return new Result(200,"success",null);
    }
    public static Result error(){
        return new Result(200,"error",null);
    }
}
